<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../js/easyui/themes/icon.css">
<script type="text/javascript" src="../js/easyui/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/easyui/js/jquery.easyui.min.js"></script>
	<script  type="text/javascript">
	function selectV()
	{   //alert('0');
     var value=$('#ct').combotree('getValue');
     alert(value);
	}
	$(function(){
		$('#sb').splitbutton({  
		    menu:'#mm'  
		});
		//http://www.jeasyui.com/documentation/combotree.php
		$('#ct').combotree({
			//valueField:'id',
			url:'../userres.json',
		    checkbox:'true',
		    onSelect:function(node)
		    {
				alert(node.id+node.text);
		    }
		    
		});
		$('#cc').combobox({
		    url:'../userres.json',
		    valueField:'id',
		    textField:'text',
			    onSelect:function(node)
			    {
					alert(node.id+node.text);
			    }
		    
		});
	});
	
	</script>
</head>
<body>
<select id="ct" class="easyi-combotree" ></select>
<input type="button" onclick="selectV()" value="获取选择项" >
<a href="javascript:void(0)" id="sb" iconCls="icon-ok" onclick="javascript:alert('ok')">Ok</a>  
<div id="mm" style="width:100px;">  
    <div iconCls="icon-ok">Ok</div>  
    <div iconCls="icon-cancel">Cancel</div>  
</div>  
<select id="cc" class="easyi-combotree" ></select>
</body>
</html>